<template>
  <div class="content-notice-detail">
    <h2>{{data.noticeTitle}}</h2>
    <el-divider></el-divider>
    <div class="notice-detail" v-html="notice"></div>
    <div style="height : 100px" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: {},
      notice: "",
    };
  },
  methods: {
    getHtml() {
      // 获取html界面
      this.COMMON.httpPost(
        this,
        "noticeOperation/getNotice",
        { id: this.data.id },
        (result) => {
          if (result.result === "SUCCESS") {
            this.notice = result.data;
          }
        },
        (result) => {}
      );
    },
  },
  mounted: function () {
    this.data = this.$route.params.data;
    this.getHtml();
  },
};
</script>

<style>
.content-notice-detail {
  margin-top: 10px;
  width: 60%;
  height: 100%;
  margin: 10px auto;
  background-color: rgb(255, 255, 255);
  overflow: auto;
}
img {
  display: block;
  height: auto;
  max-width: 100%;
}
</style>